package com.k7.mobile.platform.dao.impl;

import java.util.List;

import com.k7.mobile.platform.dao.IBanIpDAO;
import com.k7.mobile.platform.dataobject.BanIpDO;


public class BanIpDAOImpl extends BaseDAOImpl implements IBanIpDAO{

	@Override
	public Long add(BanIpDO banIpDO) {
		
		Object id = getSqlMapClientTemplate().insert("BAN-IP-ADD", banIpDO);
		return (Long) id;
	}

	@Override
	public void delete(BanIpDO banIpDO) {
		
		this.getSqlMapClientTemplate().delete("BAN-IP-DEL", banIpDO);
		
	}

	@Override
	public List<BanIpDO> findList(BanIpDO banIpDO) {
		
		return this.executeQueryForList("FIND-BAN-IP-LIST","FIND-BAN-IP-LIST-COUNT",  banIpDO);
	}

	@Override
	public BanIpDO getBanIp(BanIpDO banIpDO) {
		return (BanIpDO) this.getSqlMapClientTemplate().queryForObject("GET-BAN-IP", banIpDO);
	}


}
